package com.ysd.lis.controller.qi;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.qi.QiSampleTypeCompare;
import com.ysd.lis.request.DeleteParam;
import com.ysd.lis.request.qi.SampleTypeCompareParam;
import com.ysd.lis.service.qi.QiSampleTypeCompareService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 任务与指标项目对照表 前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-08-06
 */
@RestController
@RequestMapping("/api/qi/qiSampleTypeCompare")
public class QiSampleTypeCompareController extends BaseController {

    @Autowired
    QiSampleTypeCompareService qiSampleTypeCompareService;

    @ApiOperation("获取标本类型")
    @GetMapping("/findLabSampleTypeList")
    public Result findLabSampleTypeList(SampleTypeCompareParam param) {
        return qiSampleTypeCompareService.findLabSampleTypeList(param);
    }

    @ApiOperation("添加对照关系")
    @PostMapping("/addSampleTypeCompare")
    public Result addSampleTypeCompare(@RequestBody QiSampleTypeCompare qiSampleTypeCompare) {
        return qiSampleTypeCompareService.addSampleTypeCompare(qiSampleTypeCompare);
    }

    @ApiOperation("根据申请项目获取对应的报告项目")
    @GetMapping("/findSampleTypeCompareList")
    public Result findSampleTypeCompareList(QiSampleTypeCompare qiSampleTypeCompare) {
        return qiSampleTypeCompareService.findSampleTypeCompareList(qiSampleTypeCompare);
    }

    @ApiOperation("删除对照关系")
    @PostMapping("/deleteSampleTypeCompare")
    public Result deleteSampleTypeCompare(@RequestBody DeleteParam deleteParam) {
        return qiSampleTypeCompareService.deleteSampleTypeCompare(deleteParam);
    }

}
